File manager - Edit - /home/autoph/public_html/projects/tickets-autohub/vendor/livewire/livewire/src/Controllers/CanPretendToBeAFile.php
Back
<?php namespace Livewire\Controllers; trait CanPretendToBeAFile { public function pretendResponseIsFile($file, $mimeType = 'application/javascript') { $expires = strtotime('+1 year'); $lastModified = filemtime($file); $cacheControl = 'public, max-age=31536000'; if ($this->matchesCache($lastModified)) { return response()->make('', 304, [ 'Expires' => $this->httpDate($expires), 'Cache-Control' => $cacheControl, ]); } return response()->file($file, [ 'Content-Type' => "$mimeType; charset=utf-8", 'Expires' => $this->httpDate($expires), 'Cache-Control' => $cacheControl, 'Last-Modified' => $this->httpDate($lastModified), ]); } protected function matchesCache($lastModified) { $ifModifiedSince = $_SERVER['HTTP_IF_MODIFIED_SINCE'] ?? ''; return @strtotime($ifModifiedSince) === $lastModified; } protected function httpDate($timestamp) { return sprintf('%s GMT', gmdate('D, d M Y H:i:s', $timestamp)); } }
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings